#ifndef _game_h
#define _game_h

#include <stdio.h>
#include <string.h>

#include "core.h"
#include "screen.h"
#include "input.h"
#include "exception.h"
#include "bbox.h"
#include "audio.h"


class game
{
public:
  game();
  
  bool running(); // is the game running? t yes f no
  void startSinglePlayerVsAI(); // start a single player game
  void pause(); // pause the game
  void resume(); // resume the game
  void quit(); // quit the game
  void increaseScore(char player, int i);
  void decreaseScore(char player, int i);
  void resetBallPosition();
  int getBallSpeed();
  int getPaddleSpeed();
  int setBallSpeed(int i);
  int setPaddleSpeed(int i);
  void setBallDirection(char *direction);
  char *getBallDirection();
  void updateBallPosition();
private:
  bool m_running, m_paused, m_direction, m_directionDiagonalA;
  int m_directionArray[10];
  int m_difficulty; // serves as ball speed
  int m_scoreA, m_scoreB;
  int m_paddleSpeed;
  char *m_sScore;
  
  int posPaddleA[2], posPaddleB[2], posBall[2];
  
  int posNetA[2]; // left
  int posNetB[2]; // right
  int posNetC[2]; // top
  int posNetD[2]; // bottom
  
  bbox *bboxPaddleA, *bboxPaddleB, *bboxBall, *bboxNetA, *bboxNetB, *bboxNetC, *bboxNetD;
};

#endif
